<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            width: 100%;
            height: 100vh;
            display: flex;
        }
        .heart{
            width: 200px;
            height: 200px;
            background-color: red;
            margin: auto;
            position: relative;
            transform: rotate(45deg);
            animation: beat 0.5s infinite alternate cubic-bezier(0.63,0.2,0.65,1.33);
        }
        .heart::before{
            position: absolute;
            content: "";
            width: 100%;
            height: 100%;
            background-color: inherit;
            left: -50%;
            border-radius: 50%;
        }
        .heart::after{
            position: absolute;
            content: "";
            width: 100%;
            height: 100%;
            background-color: inherit;
            top: -50%;
            border-radius: 50%;
        }
        @keyframes beat{
            to{
                opacity: 0.7;
                transform: rotate(45deg) scale(1.2);
            }
        }
    </style>
</head>
<body>
    <div class="heart"></div>
</body>
</html>